package com.sense.kukoo.biz_messages.adapter.provider

import com.sense.kukoo.biz_messages.R
import com.sense.kukoo.biz_messages.adapter.MessagesItemAdapter
import com.sense.kukoo.common.repo.biz.MessagesItemBean
import com.sense.kukoo.common.wiget.adapter.provider.MultiItemProvider
import com.sense.kukoo.common.wiget.adapter.viewholder.BaseViewHolder

class ViewMoreMessagesItemProvider(
    val listener: MessagesItemAdapter.MessagesItemListener,
): MultiItemProvider<MessagesItemBean>() {

    override fun getItemType(): Int = MessagesItemBean.TYPE_VIEW_MORE

    override fun getItemLayoutId(): Int = R.layout.biz_messages_item_view_more

    override fun onBindViewHolder(viewHolder: BaseViewHolder, item: MessagesItemBean) {
        viewHolder.getView(R.id.click_btn_view_more).setOnClickListener {
            listener.onViewMore(item)
        }
    }
}